<?php
/**
 * 节点管理
 * 
 * @author  Lee<a605333742@gmail.com>
 * @time    2016-08-11
 */
namespace Admin\Controller;

class NodeController extends CommonController{
    /*
     * 构造函数
     * 
     * @return #
     */
    public function _initialize() {
        parent::_initialize();
        $this->db   =D("Node");
    }
    
    /*
     * index前置操作
     * 
     * @return #
     */
    public function _before_index(){
        $map['status']  =1;
        $map['level']   =0;
        $topNoList      =$this->db->where($map)->select();
        $this->assign("topNoList",$topNoList);
   }
   
   /*
    * show前值操作
    * 
    * @return #
    */
   public function _before_show(){
       $this->_before_index();
   }
   
   /*
     * ajax查询控制器名称并返回控制器
     * 
     * @return array $controlName
     */
    public function ajaxControl(){
        $ajaxP_id   =I("request.pid","","int");
        $controlName=$this->db->find($ajaxP_id);
        $controll   =$controlName['controller'];
        echo $controll;
    }    
}